package com.itheima.HoneWork.homework02;

import java.util.Objects;

public class Hero {
    private String name;
    private String sc;
    private String gj;
    private String xg;
    private double xssy;

    public Hero() {
    }

    public Hero(String name, String sc, String gj, String xg) {
        this.name = name;
        this.sc = sc;
        this.gj = gj;
        this.xg = xg;
        setXssy();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSc() {
        return sc;
    }

    public void setSc(String sc) {
        this.sc = sc;
    }

    public String getGj() {
        return gj;
    }

    public void setGj(String gj) {
        this.gj = gj;
    }

    public String getXg() {
        return xg;
    }

    public void setXg(String xg) {
        this.xg = xg;
    }

    public double getXssy() {
        return xssy;
    }

    public void setXssy() {
        this.xssy = Double.parseDouble(sc)*0.5+Double.parseDouble(gj)*0.2+Double.parseDouble(xg)*03;
    }



}
